<template>
  <div class="home">
    <keep-alive :include="find">
      <router-view />
    </keep-alive>
    <van-tabbar
      v-if="$route.meta.needTab"
      v-model="active"
      active-color="#e40137"
      inactive-color="#b4b4bd"
      route
    >
      <!-- 公司 -->
      <van-tabbar-item to="/company"
        >公司
        <template #icon>
          <i class="iconfont myicon iconicon_footbar_gs_sel"></i>
        </template>
      </van-tabbar-item>
      <!-- 刷题 -->
      <van-tabbar-item to="/question"
        >刷题
        <template #icon>
          <i class="iconfont myicon iconicon_footbar_st_sel"></i>
        </template>
      </van-tabbar-item>
      <!-- 发现 -->
      <van-tabbar-item to="/find"
        >发现
        <template #icon>
          <i class="iconfont myicon iconicon_footbar_fx_sel"></i>
        </template>
      </van-tabbar-item>
      <!-- 我的 -->
      <van-tabbar-item to="/my"
        >我的
        <template #icon>
          <i class="iconfont myicon iconicon_footbar_wode_nor"></i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'home',
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style lang="less" scoped>
.home {
  .myicon {
    font-size: 25px;
  }
}
</style>
